import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import request from './request'
import "./assets/style.css"

import ZkTable from 'vue-table-with-tree-grid'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import {
  Date
} from 'core-js'

Vue.use(request);
Vue.use(ElementUI);
Vue.use(ZkTable);
Vue.config.productionTip = false


// 全局时间过滤器
Vue.filter("dataFormat", function (dataValue) {
  const da = new Date(dataValue)

  const y = da.getFullYear()
  const m = (da.getMonth() + 1 + "").padStart(2, "0")
  const d = (da.getDate() + '').padStart(2, "0")
  const hh = (da.getHours() + '').padStart(2, "0")
  const mm = (da.getMinutes() + '').padStart(2, "0")
  const ss = (da.getSeconds() + '').padStart(2, "0")


  return `${y}-${m}-${d}  ${hh}:${mm}:${ss}`
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')